/**
 * Description:
 * Class Name:URLDecoderTest
 * Date:2022/5/20 18:51
 *
 * @author LTisme
 * @version JAVA17
 */
package 疯狂Java讲义.第17章_网络编程._17_2_Java的基本网络支持._17_2_2_使用URLDecoder和URLEncoder;

import java.net.URLDecoder;
import java.net.URLEncoder;

public class URLDecoderTest {
    public static void main(String[] args) throws Exception{
        String target = "%E7%96%AF%E7%8B%82java";
        String keyWord = URLDecoder.decode(target, "utf-8");
        System.out.println(keyWord);

        String urlStr = URLEncoder.encode("疯狂Android讲义", "gbk");
        System.out.println(urlStr);
    }
}
//疯狂java
//%B7%E8%BF%F1Android%BD%B2%D2%E5